package com.yq.day18._04lambda;

/**
 * @author 3307235355@qq.com
 * @since 2022/06/18 17:06
 */
public class Demo01 {
    public static void main(String[] args) {
        P p1 = () -> System.out.println("test");
        p1.test();

        OneP p2 = a -> System.out.println("a="+a);
        p2.test(12);
    }
}
@FunctionalInterface
interface P{
    void test();
}

@FunctionalInterface
interface OneP{
    void test(int a);
}